package tech.xiaozai.rbac.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-09-15 10:59
 *
 *  子容器配置类
 */
@Configuration
@EnableWebMvc
@ComponentScan(basePackages = {"tech.xiaozai.rbac.controller","tech.xiaozai.rbac.exce"})

@Import({SwaggerConfig.class})
public class WebConfig implements WebMvcConfigurer {


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        registry.addResourceHandler("/**")
                .addResourceLocations("classpath:/META-INF/resources/");
    }
}
